package czk.jvm.lecture.memory;

import java.util.ArrayList;
import java.util.List;

/**
 * -Xms5m -Xmx5m -XX:+HeapDumpOnOutOfMemoryError
 * 设置虚拟机内存，最小5m,最大为5m,
 * -XX:+HeapDumpOnOutOfMemoryError 保存dump文件
 */
public class MyTest1 {
    public static void main(String[] args) {
        List<MyTest1> list=new ArrayList<>();
        for (;;){
            list.add(new MyTest1());
            System.gc();
        }
    }
}
